﻿using System;
using System.Text;

using Microsoft.SPOT.Net.NetworkInformation;
using Microsoft.SPOT;

namespace mfLogger.NetduinoPlus2.TestApp
{
    public class mfNetworkInitialization
    {
        #region CTOR
        public mfNetworkInitialization() 
        {
        
        }
        #endregion

        #region mfINetworkInitialization

        public static  void InitializeNetworkInfrastructure()
        {
            var netIOs = NetworkInterface.GetAllNetworkInterfaces();

            foreach (var netIO in netIOs)
            {
                netIO.EnableStaticIP("192.168.70.106", "255.255.255.0", "192.168.70.254");
                netIO.EnableStaticDns(new string[] { "192.168.70.254" });

            }
            Debug.Print("Network initialized");
        } 

        #endregion
    }
}
